'use strict';

module.exports = app => {
    const {DataTypes} = app.Sequelize;
    const Video = app.model.define('video', {
        id: { 
            type: DataTypes.UUID,
            defaultValue: app.Sequelize.UUIDV4, 
            primaryKey: true,
            notNull: true,
            comment: 'ID'
        },
        h:{type:DataTypes.INTEGER},
        w:{type:DataTypes.INTEGER},
        author:{type: DataTypes.STRING(50),notNull: true,comment: '视频名字'},
        video_key: {type: DataTypes.STRING(200),notNull: true,comment: '文件路径'},
        videoName: {type: DataTypes.STRING(30),notNull: true,comment: '标题'},
        orderBy:{type:DataTypes.INTEGER,primaryKey: true,},
    },
  );
  Video.sync()
  return Video;
};